package com.zk.service;

import com.zk.dao.StudentDao;
import com.zk.domain.Student;

import java.util.List;

/**
 * @author ZK
 * @Description
 * @time 2021/5/14 12:52
 * @note
 */
public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao;

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.insertStudent(student);
    }

    @Override
    public List<Student> queryStudents() {
        return studentDao.selectStudents();
    }

    @Override
    public int deleteStudent(Integer id) {
        return studentDao.deleteStudent(id);
    }
}
